<template>
  <div id="app">
    <div class="router">
      <div @click="jumpTodo" class="todo">todolist</div>
      <div @click="jumpApi" class="api">api调用</div>
    </div>
    <router-view />
  </div>
</template>
<script>
import router from "./router/index";

export default {
  methods: {
    jumpApi() {
      router.push("/api").catch(() => {});
    },
    jumpTodo() {
      router.push("/todolist").catch(() => {});
    },
  },
};
</script>

<style scoped>
.router div {
  width: 80px;
  height: 50px;
  line-height: 50px;
  background-color: #409eff;
  border-radius: 6px;
  text-align: center;
  cursor: pointer;
  margin-bottom: 10px;
}
</style>
